/* eslint-disable no-empty-pattern */
import { api_getPurviewIdsByIdRole } from '@/api/sys_role_purview'

const state = {}

const mutations = {}

const actions = {
  // 根据角色id查到所有的权限id列表
  getPurviewIdsByIdRole({}, idRole) {
    return new Promise((resolve, reject) => {
      api_getPurviewIdsByIdRole(idRole)
        .then((response) => {
          resolve(response.data.data)
        })
        .catch((error) => {
          reject(error)
        })
    })
  },
}

export default {
  namespaced: true,
  state,
  mutations,
  actions,
}
